package com.hippo.module.sys.controller;

import com.hippo.common.base.model.ResponseDataModel;
import com.hippo.common.base.util.ResponseDataUtil;
import com.hippo.module.sys.service.SysInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 *
 * <p>
 * Title: SysInfoController.java
 * </p>
 * Description: 系统信息
 * <p>
 * Modify histoty:
 *
 * @author cjh
 * @version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/sysInfo")
public class SysInfoController {
    @Autowired
    private SysInfoService sysInfoService;

    /**
     * 初始系统信息数据
     *
     * @return
     */

    @GetMapping("/initSysInfoData")
    public ResponseDataModel initSysInfoData(HttpServletResponse response) throws Exception {
        Map<String,Object> map = this.sysInfoService.querySysInfo();
        return ResponseDataUtil.createResponseData(true,"初始系统信息数据成功",map);
    }
}
